package com.team.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.app.dao.CustomerDao;
import com.team.app.model.Customer;


@Service
public class CustomerServiceImpl implements CustomerService{
	@Autowired
    private CustomerDao customerDao;     

	@Override
	@Transactional
	public Long create(Customer obj) {
		// TODO Auto-generated method stub
		return customerDao.create(obj);
	}

	@Override
	@Transactional
	public void edit(Customer obj) {
		// TODO Auto-generated method stub
		customerDao.edit(obj);
	}

	@Override
	@Transactional
	public void remove(Customer obj) {
		// TODO Auto-generated method stub
		customerDao.remove(obj);
	}

	@Override
	@Transactional
	public Customer find(Object id) {
		// TODO Auto-generated method stub
		return customerDao.find(id);
	}

	@Override
	@Transactional
	public List<Customer> findAll() {
		// TODO Auto-generated method stub
		return customerDao.findAll();
	}

	@Override
	@Transactional
	public List<Customer> findRange(int[] range) {
		// TODO Auto-generated method stub
		return customerDao.findRange(range);
	}

	@Override
	@Transactional
	public Long count() {
		// TODO Auto-generated method stub
		return customerDao.count();
	} 
}
